import java.util.List;

/**
 * 总长度：str.sub(4,8)
 *
 *
 */
public class Test01 {

    // 计算一个字节的值
    int getNum(String numStr) {
        int total = 0;
        for (int i = 1; i >= 0; i--) {
            if (numStr.charAt(i) <= 57) {
                total += (numStr.charAt(i) - 48)*Math.pow(16, 1 - i);
            } else {
                total += (numStr.charAt(i) - 55)*Math.pow(16, 1 - i);
            }
        }
        return total;
    }
    // 计算双字节的值
    int getBytesNum(List<String> byteStrings) {
        int total = 0;
        for (int i = 1; i >= 0; i--) {
            String currentStr = byteStrings.get(i);
            total += getNum(currentStr)*Math.pow(Math.pow(16,2), 1 - i);
        }
        return total;
    }
    //计算前三位的值
    int getBitNum(String numStr) {
        Integer num = getNum(numStr);
        byte byteValue= num.byteValue();
        return byteValue>>5;
    }

    int parsePacket(String sourceStr) {
        return 0;
    }


    public static void main(String[] args) {
        char r = 'A';
        int b = 1;
        b += Math.pow(2, 2);
        System.out.println(b);
        System.out.println(r-0);
        Integer t = 32;
        Byte bb = t.byteValue();
        System.out.println(bb>>5);
        System.out.println(new Test01().getNum("3C"));
    }
}
